package com.jalarbee.web.jsf.resolver;

import javax.el.ELContext;
import javax.faces.context.FacesContext;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
import org.springframework.web.jsf.el.SpringBeanFacesELResolver;

public class CustomSpringBeanFacesELResolver extends SpringBeanFacesELResolver {

	
	
	
	@Override
	protected WebApplicationContext getWebApplicationContext(ELContext elContext) {
		
		System.out.println("//////////////////////////////////////////////////////////");
		
		WebApplicationContext context = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance());
		System.out.println(context.getBean("productService"));
		return context;
	}
}
